#include "PreRenderMaterial.h"



uint64_t SPreRenderPipeline::GetHashCode() const
{
    uint64_t HashCode = 0;
    WH::HashCombine(HashCode, (uint64_t)VertexShader.get());
    WH::HashCombine(HashCode, (uint64_t)FragmentShader.get());
    WH::HashCombine(HashCode, (uint64_t)bDoubleSided);
    WH::HashCombine(HashCode, (uint64_t)Type);
    return HashCode;
}

uint64_t SPreRenderMaterialParameters::GetHashCode() const
{
    uint64_t HashCode = 0;
    for (auto& Parameter : Parameters)
    {
        WH::HashCombine(HashCode, Parameter);
    }
    for (auto& Texture2D : Texture2Ds)
    {
        WH::HashCombine(HashCode, (uint64_t)Texture2D.get());
    }
    for (auto& TextureCube : TextureCubes)
    {
        WH::HashCombine(HashCode, (uint64_t)TextureCube.get());
    }
    return HashCode;
}
